<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<#include "/common/header.ftl">
     <script src="/common/bank/addcard.js"></script>
    <title></title>
    <script type="text/javascript" src="/common/js/numberFormat.js"></script>
</head>
<body>
    <form id="edit_activity_form"  method="post">
    <input type="hidden" id="id" name="id" value="${lotteryTicketInfoVo.id}">
    <input type="hidden" id="ltVersion" name="version" value="${lotteryTicketInfoVo.version}">
    <input type="hidden" name="type" value="${lotteryTicketInfoVo.type}">
    <input type="hidden" name="investBackCurrentAmount" value="${lotteryTicketInfoVo.investBackCurrentAmount}">
    <table class="formTable" id="add_activity_Tab">
         <tr>
             <td align="right" class="label">标题：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.title }</span>
             </td>
         </tr>
         <tr>
             <td align="right" class="label"> 互动类型：</td>
             <td class="value">
             	<span id="interactiveType">${lotteryTicketInfoVo.interactiveTypeName}</span>
             </td>
         </tr>
         <tr>
             <td align="right" class="label"> 发放方式：</td>
             <td class="value">
             	<span id="grantMode">${lotteryTicketInfoVo.grantModeName}</span>
             </td>
         </tr>
         <tr>
             <td align="right" class="label"> 生成奖券类型：</td>
             <td class="value">
             	<span id="type">${lotteryTicketInfoVo.typeName}</span>
             </td>
         </tr>
         <tr id="freetickettype_">
             <td align="right" class="label"> 免息券类型：</td>
             <td class="value">
             	<span id="type">${lotteryTicketInfoVo.freeTicketTypeName}</span>
             </td>
         </tr>
         <tr id="freeticketvalue_">
             <td align="right" class="label"> 减免利率：</td>
             <td class="value">
             	<span id="type">${lotteryTicketInfoVo.freeTicketValue}</span>
             </td>
         </tr>
         <tr id="addInterestRate_">
             <td align="right"  class="label">加息率：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.addInterestRate}%</span>
             </td>
         </tr>
         <tr id="addInterestDays_">
             <td align="right"  class="label">加息时长：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.addInterestDays}天</span>
             </td>
         </tr>
         <tr id="maxInvestAmount_">
             <td align="right"  class="label">最大投资金额：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.maxInvestAmount}元</span>
             </td>
         </tr>
         <tr id="tasteType_">
	             <td align="right" class="label">体验金类型：</td>
	             <td class="value">
	             	<span id="tasteType">${lotteryTicketInfoVo.tasteName}</span>
	             </td>
	         </tr>
	      <#--<c:if test="${not empty lotteryTicketInfoVo.investRatio}">
	      <tr id="investRatio_">
	             <td align="right"  class="label">体验金倍数：</td>
	             <td class="value">
	             	<span id="investRatio">${lotteryTicketInfoVo.investRatio}倍</span>
	             </td>
	      </tr>-->
		  <#if lotteryTicketInfoVo.investRatio ??>
			  <tr id="investRatio_">
				  <td align="right"  class="label">体验金倍数：</td>
				  <td class="value">
					  <span id="investRatio">${lotteryTicketInfoVo.investRatio}倍</span>
				  </td>
			  </tr>
	      </#if>
	      <tr id="maxTasteAmount_">
	             <td align="right"  class="label">赠送体验金上限：</td>
	             <td class="value">
	             	<span id="maxTasteAmount">
                    <#--<fmt:formatNumber value="${lotteryTicketInfoVo.maxInvestAmount}" pattern="#,#00.00#"/>-->
                    <#if lotteryTicketInfoVo.maxInvestAmount ??>
                    ${lotteryTicketInfoVo.maxInvestAmount?string.number}元</span>
                     </#if>
	             </td>
	      </tr>
	     <#-- <c:if test="${lotteryTicketInfoVo.type!=12}">
        	 <tr id="amount_">
             <td align="right"  class="label">奖券金额(元)：</td>
             <td class="value">
	      		<c:if test="${not empty lotteryTicketInfoVo.amount}">
             	<span>${lotteryTicketInfoVo.amount}元</span>
         		</c:if>
             </td>
         </tr>
         </c:if>-->
		<#if lotteryTicketInfoVo.type!='12'>
            <tr id="amount_">
                <td align="right"  class="label">奖券金额(元)：</td>
                <td class="value">
                    <#if lotteryTicketInfoVo.amount ??>
                        <span>${lotteryTicketInfoVo.amount}元</span>
                    </#if>
                </td>
            </tr>
		</#if>
         <#--<c:if test="${lotteryTicketInfoVo.type==12}">
          <tr id="amount_">
             <td align="right"  class="label">积分：</td>
             <td class="value">
              	<c:if test="${lotteryTicketInfoVo.integralType==1}">
             		<span>${lotteryTicketInfoVo.amount}</span>
             	</c:if>
             	<c:if test="${lotteryTicketInfoVo.integralType==2}">
             		<span>(投资金额或借款金额) * ${lotteryTicketInfoVo.integralRatio} / ${lotteryTicketInfoVo.integralParamOne} * ${lotteryTicketInfoVo.integralParamTwo}</span>
             	</c:if>
             	<c:if test="${lotteryTicketInfoVo.integralType==3}">
             		<span>无规律</span>
             	</c:if>
             </td>
         </tr>
         </c:if>-->
		<#if lotteryTicketInfoVo.type=='12'>
            <tr id="amount_">
                <td align="right"  class="label">积分：</td>
                <td class="value">
                    <#if lotteryTicketInfoVo.integralType=='1'>
                        <span>${lotteryTicketInfoVo.amount}</span>
                    </#if>
					<#if lotteryTicketInfoVo.integralType=='2'>
								<span>(投资金额或借款金额) * ${lotteryTicketInfoVo.integralRatio} / ${lotteryTicketInfoVo.integralParamOne} * ${lotteryTicketInfoVo.integralParamTwo}</span>
					</#if>
					<#if lotteryTicketInfoVo.integralType=='3'>
								<span>无规律</span>
					</#if>
                </td>
            </tr>
		</#if>
         <tr id="tasteRateDays_">
	             <td align="right"  class="label">生息天数(天)：</td>
	             <td class="value">
	                <span>${lotteryTicketInfoVo.addInterestDays}天</span>
	             </td>
	     </tr>
	     <#--<c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="borrowTypes_">
       		  	<td align="right"  class="label">适用标：</td>
       			<td class="value" colspan="3">
       				<input id="borrowTypes1" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox"/>新手标
       				<input id="borrowTypes2" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox"/>活期宝
       				<input id="borrowTypes3" value="2" type="checkbox" onclick="return false;" class="easyui-validatebox"/>优选计划
       				<input id="borrowTypes4" value="0" type="checkbox" onclick="return false;" class="easyui-validatebox"/>散标
       				<input id="borrowTypes5" value="5" type="checkbox" onclick="return false;" class="easyui-validatebox"/>游艇宝
       				<input id="borrowTypes6" value="6" type="checkbox" onclick="return false;" class="easyui-validatebox"/>酒店宝
       				<input id="borrowTypes8" value="8" type="checkbox" onclick="return false;" class="easyui-validatebox"/>秒借
       				<input id="borrowTypes9" value="9" type="checkbox" onclick="return false;" class="easyui-validatebox"/>有用分期
       				<input id="borrowTypes10" value="10" type="checkbox" onclick="return false;" class="easyui-validatebox"/>车信宝
       			</td>
       		</tr>
       		<tr id="repaymentType_">
       		  	<td align="right"  class="label">可使用还款类型：</td>
       			<td class="value" colspan="3">
       				<input id="repaymentType3" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox"/>提前还款
       				<input id="repaymentType1" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox"/>正常还款
       				<input id="repaymentType4" value="4" type="checkbox" onclick="return false;" class="easyui-validatebox"/>逾期还款
       			</td>
       		</tr>
       		<tr id="publishPlatforms_">
       		  	<td align="right"  class="label">使用平台：</td>
       			<td class="value" colspan="3">
       				<input id="publishPlatforms1" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox" />PC
       				<input id="publishPlatforms2" value="2" type="checkbox" onclick="return false;" class="easyui-validatebox" />APP
       				<input id="publishPlatforms3" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox" />触屏版
       			</td>
       		</tr>
       		</c:if>
       		<c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="validTermType_">
             <td align="right" class="label"> 有效期类型：</td>
             <td class="value">
             	<span id="validTermType"></span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="validTermId">
             <td align="right"  class="label">奖券有效期(天)：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.validTerm }天</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="validDayStartId">
             <td align="right"  class="label">有效开始时间：</td>
             <td class="value">
             	<span><fmt:formatDate value="${lotteryTicketInfoVo.validDayStart}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="validDayEndId">
             <td align="right"  class="label">有效截止时间：</td>
             <td class="value">
             	<span><fmt:formatDate value='${lotteryTicketInfoVo.validDayEnd }' pattern='yyyy-MM-dd HH:mm:ss'/>"/></span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="investMiniAmount_">
             <td align="right"  class="label">投资使用门槛(元)：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.investMiniAmount}元</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="generateNum_">
             <td align="right"  class="label">生成优惠券张数：</td>
             <td class="value">
             	<span>
             		<c:if test="${not empty lotteryTicketInfoVo.generateNum}">${lotteryTicketInfoVo.generateNum}张</c:if>
             	</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="limitApieceNum_">
             <td align="right"  class="label">限制每人领取张数：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.limitApieceNum}张</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="cashPackage_">
	             <td align="right" class="label">红包类型：</td>
	             <td class="value">
	             	<span id="cashPackageTypeName"></span>
	             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="cashPackageAmount_">
             <td align="right" class="label">固定金额：</td>
             <td class="value">
             	<span><fmt:formatNumber value="${lotteryTicketInfoVo.amount}" type="currency"/>元</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="investBackRate_">
             <td align="right"  class="label">返现率：</td>
             <td class="value">
             	<c:if test="${not empty lotteryTicketInfoVo.investBackRate}"><span>${lotteryTicketInfoVo.investBackRate}%</span></c:if>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="investBackDays_">
             <td align="right"  class="label">返现天数：</td>
             <td class="value">
             	<span>${lotteryTicketInfoVo.addInterestDays}天</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="ticketAllAmount_">
             <td align="right"  class="label">红包总金额上限：</td>
             <td class="value">
             	<span>
             	<c:if test="${not empty lotteryTicketInfoVo.ticketAllAmount}">
             		<fmt:formatNumber value="${lotteryTicketInfoVo.ticketAllAmount}" type="currency"/>元
             	</c:if>
             	</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="investBackCurrentAmount_">
             <td align="right"  class="label">红包剩余总金额：</td>
             <td class="value">
             	<span>
             	<c:if test="${not empty lotteryTicketInfoVo.investBackCurrentAmount}">
             		<fmt:formatNumber value="${lotteryTicketInfoVo.investBackCurrentAmount}" type="currency"/>元
             	</c:if>
             	</span>
             </td>
         </tr>
         </c:if>
         <c:if test="${lotteryTicketInfoVo.type!=12}">
         <tr id="sub_amount_">
             <td align="right"  class="label">递减金额：</td>
             <td class="value">
             	<input name="subAmount" class="easyui-numberbox" style="width: 240px" data-options="min:0.01,max:100000,precision:2"
	             	value=""/>元
             </td>
         </tr>
         </c:if>-->
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="borrowTypes_">
                <td align="right"  class="label">适用标：</td>
                <td class="value" colspan="3">
                    <input id="borrowTypes1" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox"/>新手标
                    <input id="borrowTypes2" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox"/>活期宝
                    <input id="borrowTypes3" value="2" type="checkbox" onclick="return false;" class="easyui-validatebox"/>优选计划
                    <input id="borrowTypes4" value="0" type="checkbox" onclick="return false;" class="easyui-validatebox"/>散标
                    <input id="borrowTypes5" value="5" type="checkbox" onclick="return false;" class="easyui-validatebox"/>游艇宝
                    <input id="borrowTypes6" value="6" type="checkbox" onclick="return false;" class="easyui-validatebox"/>酒店宝
                    <input id="borrowTypes8" value="8" type="checkbox" onclick="return false;" class="easyui-validatebox"/>秒借
                    <input id="borrowTypes9" value="9" type="checkbox" onclick="return false;" class="easyui-validatebox"/>有用分期
                    <input id="borrowTypes10" value="10" type="checkbox" onclick="return false;" class="easyui-validatebox"/>车信宝
                </td>
            </tr>
            <tr id="repaymentType_">
                <td align="right"  class="label">可使用还款类型：</td>
                <td class="value" colspan="3">
                    <input id="repaymentType3" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox"/>提前还款
                    <input id="repaymentType1" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox"/>正常还款
                    <input id="repaymentType4" value="4" type="checkbox" onclick="return false;" class="easyui-validatebox"/>逾期还款
                </td>
            </tr>
            <tr id="publishPlatforms_">
                <td align="right"  class="label">使用平台：</td>
                <td class="value" colspan="3">
                    <input id="publishPlatforms1" value="1" type="checkbox" onclick="return false;" class="easyui-validatebox" />PC
                    <input id="publishPlatforms2" value="2" type="checkbox" onclick="return false;" class="easyui-validatebox" />APP
                    <input id="publishPlatforms3" value="3" type="checkbox" onclick="return false;" class="easyui-validatebox" />触屏版
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="validTermType_">
                <td align="right" class="label"> 有效期类型：</td>
                <td class="value">
                    <span id="validTermType"></span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="validTermId">
                <td align="right"  class="label">奖券有效期(天)：</td>
                <td class="value">
                    <span>${lotteryTicketInfoVo.validTerm }天</span>
                </td>
            </tr>
		</#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="validDayStartId">
                <td align="right"  class="label">有效开始时间：</td>
                <td class="value">
                    <#if lotteryTicketInfoVo.validDayStart ??>
                        <span> ${lotteryTicketInfoVo.validDayStart?string("yyyy-MM-dd HH:mm:ss")}</span>
                    </#if>
<#--
                    <span><fmt:formatDate value="${lotteryTicketInfoVo.validDayStart}" pattern="yyyy-MM-dd HH:mm:ss"/> </span>
-->
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="validDayEndId">
                <td align="right"  class="label">有效截止时间：</td>
                <td class="value">
                    <#if lotteryTicketInfoVo.validDayEnd ??>
                        <span> ${lotteryTicketInfoVo.validDayEnd?string("yyyy-MM-dd HH:mm:ss")}</span>
                    </#if>
                    <#--<span><fmt:formatDate value='${lotteryTicketInfoVo.validDayEnd }' pattern='yyyy-MM-dd HH:mm:ss'/>"/></span>-->
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="investMiniAmount_">
                <td align="right"  class="label">投资使用门槛(元)：</td>
                <td class="value">
                    <span>${lotteryTicketInfoVo.investMiniAmount}元</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="generateNum_">
                <td align="right"  class="label">生成优惠券张数：</td>
                <td class="value">
             	<span>
             		<#if lotteryTicketInfoVo.generateNum ??>${lotteryTicketInfoVo.generateNum}张</#if>
             	</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="limitApieceNum_">
                <td align="right"  class="label">限制每人领取张数：</td>
                <td class="value">
                    <span>${lotteryTicketInfoVo.limitApieceNum}张</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="cashPackage_">
                <td align="right" class="label">红包类型：</td>
                <td class="value">
                    <span id="cashPackageTypeName"></span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="cashPackageAmount_">
                <td align="right" class="label">固定金额：</td>
                <td class="value">
                    <#--<span><fmt:formatNumber value="${lotteryTicketInfoVo.amount}" type="currency"/>元</span>-->
                    <span>
                        <#if lotteryTicketInfoVo.amount ??>
                            ${lotteryTicketInfoVo.amount?string.currency}
                        </#if>
                    </span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="investBackRate_">
                <td align="right"  class="label">返现率：</td>
                <td class="value">
                    <#if lotteryTicketInfoVo.investBackRate ??><span>${lotteryTicketInfoVo.investBackRate}%</span></#if>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="investBackDays_">
                <td align="right"  class="label">返现天数：</td>
                <td class="value">
                    <span>${lotteryTicketInfoVo.addInterestDays}天</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="ticketAllAmount_">
                <td align="right"  class="label">红包总金额上限：</td>
                <td class="value">
             	<span>
             	<#if lotteryTicketInfoVo.ticketAllAmount ??>
             		<#--<fmt:formatNumber value="${lotteryTicketInfoVo.ticketAllAmount}" type="currency"/>元-->
             		${lotteryTicketInfoVo.ticketAllAmount?string.currency}
             	</#if>
             	</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="investBackCurrentAmount_">
                <td align="right"  class="label">红包剩余总金额：</td>
                <td class="value">
             	<span>
             	<#if lotteryTicketInfoVo.investBackCurrentAmount ??>
             		<#--<fmt:formatNumber value="${lotteryTicketInfoVo.investBackCurrentAmount}" type="currency"/>元-->
             		${lotteryTicketInfoVo.investBackCurrentAmount?string.currency}
             	</#if>
             	</span>
                </td>
            </tr>
        </#if>
        <#if lotteryTicketInfoVo.type!='12'>
            <tr id="sub_amount_">
                <td align="right"  class="label">递减金额：</td>
                <td class="value">
                    <input name="subAmount" class="easyui-numberbox" style="width: 240px" data-options="min:0.01,max:100000,precision:2"
                           value=""/>元
                </td>
            </tr>
        </#if>
         <tr>
             <td align="right" class="label">开始时间：</td>
             <td class="value">
             	<#--<span><fmt:formatDate value="${lotteryTicketInfoVo.startTime }" pattern="yyyy-MM-dd HH:mm:ss"/></span>-->
                    <span> ${lotteryTicketInfoVo.startTime?string("yyyy-MM-dd HH:mm:ss")}</span>
             </td>
         </tr>
         <tr>
             <td align="right" class="label">结束时间：</td>
             <td class="value">
             <#--	<span><fmt:formatDate value="${lotteryTicketInfoVo.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>-->
                 <span> ${lotteryTicketInfoVo.endTime?string("yyyy-MM-dd HH:mm:ss")}</span>
             </td>
         </tr>
         <tr>
             <td align="right" class="label"> 状态：</td>
             <td class="value">
             	<select name="status" id="status" >
             	   <option >请选择</option>
                   <option value="1">生效</option>
                   <option value="2">失效</option>
                </select>
             </td>
         </tr>
         <tr>
             <td align="center" colspan="4">
             	<a href="#" id="edit_activity_submit" onclick="return updateActivitySubmit();" name="change-permission" class="easyui-linkbutton" iconcls="icon-ok">确 定</a> 
             	&nbsp;&nbsp;
 				<a href="#" id="edit_activity_cancel" onclick="return editActivityCancel();" name="cancle-permission" class="easyui-linkbutton" iconcls="icon-cancel">取 消</a>
             </td>
         </tr>
   </table> 
 </form>
<script>
	// 修改用户 取消
    function editActivityCancel() {
    	window.parent.closeDetailWin();
    }
	
/*	function updateActivitySubmit(){
		$.messager.progress({text:'执行中...'});
		$('#edit_activity_form').form('submit',{
            url: '/lotteryTicket/updateLotteryTicket',
            onSubmit: function(){
            },
            success: function(result){
            	$.messager.progress('close');
            	var result = eval('('+result+')');
            	if (result.code==-1) {
    				$.messager.alert('错误',result.msg);
    			} else {
    				$.messager.alert('成功',result.msg,'info',function(){
	    				window.parent.closeDetailWin();
    				});
    			}
            }
        });
    }*/
    function updateActivitySubmit(){
        var status = $('#status option:selected').val();
        var id = $('#id').val();
        $.ajax(
                {
                    type:'post',
                    url: '/lotteryTicket/updateLotteryTicket',
                    data:{
                        "id":id,
                        "status":status
                    },
                    success: function(result){
                        $.messager.progress('close');
                        var result = eval('('+result+')');
                        if (result.code==-1) {
                            $.messager.alert('错误',result.msg);
                        } else {
                            $.messager.alert('成功',result.msg,'info',function(){
                                window.parent.closeDetailWin();
                            });
                        }
                    }
                }
        );
    }

	//初始化 显示方式 
	function initShow() {
		//只允许修改状态
		if("${lotteryTicketInfoVo.editFlag}" == "SHOW"){
			$("#edit_activity_submit").hide();
    		$("#status").val("${lotteryTicketInfoVo.status}");
    		$("#status").attr("disabled", "disabled");
		}else{
			$("#status").val("${lotteryTicketInfoVo.status}");
		}
		$("#cashPackage_").hide();
		$("#investBackDays_").hide();
		$("#investBackRate_").hide();
		$("#cashPackageAmount_").hide();
		$("#ticketAllAmount_").hide();
		$("#investBackCurrentAmount_").hide();
		$("#sub_amount_").hide();
		$("#freetickettype_").hide();
    	$("#freeticketvalue_").hide();
    	$("#repaymentType_").hide();
		
		if("${lotteryTicketInfoVo.validTermType}"=="1"){
			$("#validTermType").html("指定时间范围");
			$("#validDayStartId").show();
    		$("#validDayEndId").show();
    		$("#validTermId").hide();
		}else{
			$("#validTermType").html("指定有效天数");
			$("#validTermId").show();
    		$("#validDayStartId").hide();
    		$("#validDayEndId").hide();
		}
		
		var type = "${lotteryTicketInfoVo.type}";
	
		//加息券
		if(type==3){
			$("#addInterestRate_").show();
	    	$("#addInterestDays_").show();
	    	$("#maxInvestAmount_").show();
	    	$("#borrowTypes_").show();
	    	$("#amount_").hide();
	    	$("#investMiniAmount_").hide();
	    	$("#tasteType_").hide();
	    	$("#maxTasteAmount_").hide();
	    	$("#tasteRateDays_").hide();
			$("#freetickettype_").hide();
	    	$("#freeticketvalue_").hide();
	    	$("#repaymentType_").hide();
	    }
		//体验券
		else if(type==4){
			$("#addInterestRate_").hide();
	    	$("#addInterestDays_").hide();
	    	$("#maxInvestAmount_").hide();
	    	$("#borrowTypes_").hide();
	    	$("#tasteType_").show();
	    	$("#investMiniAmount_").hide();
	    	$("#maxTasteAmount_").show();
	    	$("#tasteRateDays_").show();
			$("#freetickettype_").hide();
	    	$("#freeticketvalue_").hide();
	    	$("#repaymentType_").hide();
		}
		//现金红包
		else if(type==7){
			$("#investBackDays_").show();
			$("#addInterestRate_").hide();
			$("#addInterestDays_").hide();
			$("#maxInvestAmount_").hide();
			$("#tasteType_").hide();
			$("#maxTasteAmount_").hide();
			$("#amount_").hide();
			$("#tasteRateDays_").hide();
			$("#borrowTypes_").hide();
			$("#publishPlatforms_").hide();
			$("#validTermType_").hide();
			$("#validTermId").hide();
			$("#validDayStartId").hide();
			$("#validDayEndId").hide();
			$("#investMiniAmount_").hide();
			$("#generateNum_").show();
			$("#limitApieceNum_").hide();
			$("#limitApieceNum_").hide();
			$("#cashPackage_").show();
			$("#sub_amount_").hide();
			$("#ticketAllAmount_").hide();
			$("#investBackCurrentAmount_").hide();
			if("${lotteryTicketInfoVo.amount}"!=""){
				$("#cashPackageAmount_").show();
				$("#investBackRate_").hide();
				$("#investBackDays_").hide();
				$("#cashPackageTypeName").html("按照固定额度");
			}else{
				$("#cashPackageAmount_").hide();
				$("#investBackRate_").show();
				$("#cashPackageTypeName").html("${lotteryTicketInfoVo.tasteName}");
			}
			$("#ticketAllAmount_").show();
			$("#investBackCurrentAmount_").show();
			if("${lotteryTicketInfoVo.editFlag}" == "SHOW"){
				$("#sub_amount_").hide();
			}else{
				$("#sub_amount_").show();
			}
			$("#freetickettype_").hide();
	    	$("#freeticketvalue_").hide();
	    	$("#repaymentType_").hide();
		}
		//其他
	    else{
			$("#addInterestRate_").hide();
	    	$("#addInterestDays_").hide();
	    	$("#maxInvestAmount_").hide();
	    	$("#tasteType_").hide();
	    	$("#amount_").show();
	    	$("#investMiniAmount_").show();
	    	$("#borrowTypes_").show();
	    	$("#maxTasteAmount_").hide();
	    	$("#tasteRateDays_").hide();
			$("#freetickettype_").hide();
	    	$("#freeticketvalue_").hide();
	    	$("#repaymentType_").hide();
		}
		if(type==13){
	    	$("#freetickettype_").show();
	    	$("#freeticketvalue_").show();
	    	$("#repaymentType_").show();
	    	$("#amount_").hide();
	    	$("#publishPlatforms_").hide();
	    	$("#investMiniAmount_").hide();
		}
		var publishPlatforms ="${lotteryTicketInfoVo.publishPlatforms}".split(",");
		for(var i = 0;i<publishPlatforms.length;i++){
			if(publishPlatforms[i]==1){
				$("#publishPlatforms1").attr("checked",true); 
			}else if(publishPlatforms[i]==2){
				$("#publishPlatforms2").attr("checked",true);
			}else if(publishPlatforms[i]==3){
				$("#publishPlatforms3").attr("checked",true);
			}
		}
		
		var borrowTypes ="${lotteryTicketInfoVo.borrowTypes}".split(",");
		for(var i = 0;i<borrowTypes.length;i++){
			if(borrowTypes[i]==3){
				$("#borrowTypes1").attr("checked",true); 
			}else if(borrowTypes[i]==1){
				$("#borrowTypes2").attr("checked",true);
			}else if(borrowTypes[i]==2){
				$("#borrowTypes3").attr("checked",true);
			}else if(borrowTypes[i]==0){
				$("#borrowTypes4").attr("checked",true);
			}else if(borrowTypes[i]==5){
				$("#borrowTypes5").attr("checked",true);
			}else if(borrowTypes[i]==6){
				$("#borrowTypes6").attr("checked",true);
			}else if(borrowTypes[i]==8){
				$("#borrowTypes8").attr("checked",true);
			}else if(borrowTypes[i]==9){
				$("#borrowTypes9").attr("checked",true);
			}else if(borrowTypes[i]==10){
				$("#borrowTypes10").attr("checked",true);
			}
		}
		
		var repaymentTypes ="${lotteryTicketInfoVo.repaymentTypes}".split(",");
		for(var i = 0;i<repaymentTypes.length;i++){
			
			if(repaymentTypes[i]==3){
				$("#repaymentType3").attr("checked",true); 
			}else if(repaymentTypes[i]==1){
				$("#repaymentType1").attr("checked",true);
			}else if(repaymentTypes[i]==4){
				$("#repaymentType4").attr("checked",true);
			}
		}
	}
	initShow();
</script>
</body>
</html>